package com.qys.livesMall.app.user.mapper;

import com.qys.livesMall.app.user.model.entity.UserShopStatistics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qys.livesMall.app.user.model.vo.ShopTeamAddVO;
import com.qys.livesMall.app.user.model.vo.ShopTeamInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 店铺和会员通用统计表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2023-08-01
 */
public interface UserShopStatisticsMapper extends BaseMapper<UserShopStatistics> {

    UserShopStatistics getbyUserName(String superior);

    UserShopStatistics selectByUserId(Long userId);

    List<UserShopStatistics> getUserShopStatisticsAll();

//    20天新增
    List<ShopTeamAddVO>  getTwentyDaysAdd(@Param("teamIds") List<Long> teamIds);

//    根据店铺id查询团队id
    List<ShopTeamInfoVO> getTeamByShopId(List<Long> shopIds);

    List<ShopTeamAddVO> getExpiredNum(@Param("teamIds") List<Long> teamIds);

    Integer updateSuperior(@Param("newUserName") String newUserName,@Param("oldUserName") String oldUserName);

    Integer updateByuserAccount(@Param("newUserName") String newUserName,@Param("nickName") String nickName,@Param("oldUserName") String oldUserName);

    List<ShopTeamAddVO> getTeamRegisterNum(List<Long> teamId);

    Integer updateNotesbyUserids(@Param("userIds") List<String> userIds,@Param("notes") String notes);

    List<Long> getShopIdsByTeamId(List<Long> list);
}
